import request from "@/utils/request";

// 查询护理计划内容信息
export function searchCheckinInfoOfCondition(params) {
	return request({
		url: "/sinohis/pension/checkin/checkinmanager/searchCheckinInfoOfCondition",
		method: 'get',
		params
	});
}

// 添加护理计划
export function nurseplanAdd(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/add",
		method: 'post',
		data
	});
}

// 护理计划添加套餐外护理项目
export function addExtraItemToPlan(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/addExtraItemToPlan/" + data.planNumber,
		method: 'post',
		data
	});
}

// 向护理计划添加护理套餐项目
export function addMealItemToPlan(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/addMealItemToPlan/" + data.planNumber,
		method: 'post',
		data
	});
}

// 禁用护理计划
export function nurseplanDisable(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/disableNursePlan/" + data.planNumber,
		method: 'PUT',
		data
	});
}

// 启用护理计划
export function nurseplanEnable(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/enableNursePlan/" + data.planNumber,
		method: 'PUT',
		data
	});
}

// 修改护理计划
export function nurseplanUpdate(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/update",
		method: 'PUT',
		data
	});
}

// 修改护理计划套餐外护理项目
export function modifyExtraNursePlanItem(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/modifyExtraNursePlanItem/" + data.planItemNumber,
		method: 'PUT',
		data
	});
}

// 修改护理计划中的套餐信息
export function modifyMealNursePlanItem(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/modifyMealNursePlanItem/" + data.planItemNumber,
		method: 'PUT',
		data
	});
}

// 删除护理计划
export function nurseplanRemove(params) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/remove/" + params.planNumber,
		method: 'DELETE',
		params
	});
}

// 删除护理计划套餐外护理项目
export function removeNursePlanItem(params) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/removeNursePlanItem/{planItemNumber}",
		method: 'DELETE',
		params
	});
}

// 根据编号查询护理计划
export function searchNursePlan(params) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/searchNursePlan/" + params.planNumber,
		method: 'get',
		params
	});
}

// 查询护理计划内容信息
export function searchNursePlanItem(params) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/searchNursePlanItem/" + params.planNumber,
		method: 'get',
		params
	});
}

// 分页查询护理计划信息
export function searchNursePlansOfConditions(params) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/searchNursePlansOfConditions",
		method: 'get',
		params
	});
}

// 查询项目套餐信息
export function searchmeal(params) {
	return request({
		url: "/sinohis/pension/checkin/checkinmanager/searchCheckInPackageInfo/" + params.checkInMark,
		method: 'get',
		params
	});
}

// 根据助记码或name查询所有项目类目子项
export function searchAllItemInfos(data) {
	return request({
		url: "/sinohis/pension/fee/itemmanager/searchAllItemInfos",
		// url: "/apisinohis/pension/fee/itemmanager/searchAllItemInfos?mnemonicCodeOrName=" + data.mnemonicCodeOrName + '&nurseItemBol=' + data.nurseItemBol,
		method: 'post',
		data
	});
}

// 禁用或启用护理计划中的套餐项目
export function disableOrEnableNursePlanItem(data) {
	return request({
		url: "/sinohis/pension/nurse/nurseplan/disableOrEnableNursePlanItem",
		method: 'PUT',
		data
	});
}

// 分页查询护理计划清单信息
export function dailycareSearchNursePlansOfConditions(params) {
	return request({
		url: "/sinohis/pension/nurse/dailycare/searchNursePlansOfConditions",
		method: 'get',
		params
	});
}

// 查询老人某天的护理计划清单
export function searchDailyCareListByOneDay(data) {
	return request({
		url: "/sinohis/pension/nurse/dailycare/searchDailyCareListByOneDay",
		method: 'post',
		data
	});
}

// 生成入住老人的指定日期计划护理清单
export function generateCareListOfCheckIn(data) {
	return request({
		url: "/sinohis/pension/nurse/dailycare/generateCareListOfCheckIn",
		method: 'post',
		data
	});
}

// 添加老人的临时护理内容
export function addSnapCare(data) {
	return request({
		url: "/sinohis/pension/nurse/dailycare/addSnapCare",
		method: 'post',
		data
	});
}

// 修改护理计划中的套餐信息
export function performCare(data) {
	return request({
		url: "/sinohis/pension/nurse/dailycare/performCare",
		method: 'PUT',
		data
	});
}

// 撤销护理内容
export function cancelCareList(data) {
	return request({
		url: "/sinohis/pension/nurse/dailycare/cancelCareList",
		method: 'PUT',
		data
	});
}

// 分页条件查询护工信息
export function condition(params) {
	return request({
		url: "/sinohis/pension/staff/careworker/page/condition",
		method: 'get',
		params
	});
}

// 分页查询志愿者信息
export function searchVolunteersOfConditions(params) {
	return request({
		url: "/sinohis/pension/staff/volunteer/searchVolunteersOfConditions",
		method: 'get',
		params
	});
}

//查询机构下的翻身项目
export function findOrganTurnOverItem(params) {
  return request({
    url: "/sinohis/pension/sys/institutionalsetting/findOrganTurnOverItem/"+params.institutionNumber ,
    method: 'get',
    params
  });
}


//分页查询护理计划模板信息
export function searchCarePlanTemplateOfConditions(params) {
  return request({
    url: "/sinohis/pension/nurse/template/searchCarePlanTemplateOfConditions" ,
    method: 'get',
    params
  });
}


//模板内容详情查询

export function searchCarePlanTemplateContentVO(params) {
  return request({
    url: "/sinohis/pension/nurse/template/searchelderlytemplatecontent/"+params.templateNumber+'/'+params.checkInMark,
    method: 'get',
    params
  });
}
//自动生成护理计划信息
export function autoGenerateNursePlan(data) {
  return request({
    url: "/sinohis/pension/nurse/nurseplan/autoGenerateNursePlan",
    method: 'post',
    data
  });
}
//查询老人护理计划清单


export function searchDailyCareListByListTime(data) {
  return request({
    url: "/sinohis/pension/nurse/dailycare/searchDailyCareListByListTime",
    method: 'post',
    data
  });
}

//一键执行护理清单

export function akeydailycare(data) {
  return request({
    url: "/sinohis/pension/nurse/dailycare/akeyperformCare/{performTime}\n",
    method: 'PUT',
    data
  });
}
